// var mUrl = 'http://47.93.1.92:8999/hunt-admin';
//var mUrl = 'http://192.168.8.103:8080';
//var mUrl = 'http://39.105.51.148:6060/hunt-admin';
//var mUrl = 'http://39.105.51.148:7878/hunt-admin';
//var mUrl = 'http://39.105.51.148:7878/hunt-admin';//正式服务器
//var mUrl = 'http://192.168.1.152:8080/hunt-admin';//测试服务器
var mUrl = 'http://localhost:7878';//本机服务器
serverStatus_tool = {

    form_clear: function () {
        $("#serverstate_grid").form('reset');
        $("#serverstate_grid").form('clear');
        $("#serverstate_grid").treegrid("uncheckAll");
    },
    init_main_view: function () {
        $("#serverstate_grid").datagrid({
            url: getRootPath()+'/account/getServerState',
            method: 'get',
            idField: "id",
            fitColumns: true,
            rownumbers: true,
            animate: true,
            singleSelect: true,
            fit: true,
            border: false,
            pagination: true,
            striped: true,
            pagePosition: "bottom",
            pageNumber: 1,
            pageSize: 15,
            pageList: [15, 30, 45, 60],
            columns: [[
                {title: "服务器名", field: "servername", width: 300},
                {title: "服务器IP", field: "serverip",width: 300},
                {title: "在线人数", field: "onlinenumber", width: 300},
            ]],
            onLoadSuccess: function (data) {

            },
            onLoadError:function(){
                common_tool.messager_show("加载失败");
            },

        });
    }
};
$(document).ready(function () {
    serverStatus_tool.init_main_view();
});